import Layout from '@/layout'

const businessRouter = {
  path: '/business',
  component: Layout,
  redirect: '/business/order/list',
  name: 'Business',
  meta: {
    title: '业务',
    isRoot: true,
    acIdx: 2
  },
  children: [
    { // 1、实时订单
      path: 'order',
      component: () => import('@/views/business/index'), // Parent router-view
      name: 'Order',
      meta: { title: '订单', isRoot: false, acIdx: 2 },
      redirect: '/business/order/list',
      children: [
        {
          path: 'list',
          component: () => import('@/views/business/order/list/index'),
          name: 'List',
          meta: { title: '实时订单接收', isRoot: false, acIdx: 2 }
        }
      ]
    },
    { // 2、订单信息
      path: 'order',
      component: () => import('@/views/business/index'), // Parent router-view
      name: 'Order',
      meta: { title: '订单', isRoot: false, acIdx: 2 },
      redirect: '/business/order/list',
      children: [
        {
          path: 'info',
          component: () => import('@/views/business/order/info/index'),
          name: 'Info',
          meta: { title: '订单信息', isRoot: false, acIdx: 2 }
        }
      ]
    },
    { // 3、总单核对
      path: 'order',
      component: () => import('@/views/business/index'), // Parent router-view
      name: 'Order',
      meta: { title: '订单', isRoot: false, acIdx: 2 },
      redirect: '/business/order/list',
      children: [
        {
          path: 'total',
          component: () => import('@/views/business/order/total/index'),
          name: 'Total',
          meta: { title: '总单核对', isRoot: false, acIdx: 2 }
        }
      ]
    },
    { // 4、开奖号码输入
      path: 'number',
      component: () => import('@/views/business/index'), // Parent router-view
      name: 'Number',
      meta: { title: '号码', isRoot: false, acIdx: 2 },
      redirect: '/business/limit',
      children: [
        {
          path: 'enter',
          component: () => import('@/views/business/number/enter'),
          name: 'Enter',
          meta: { title: '开奖号码输入', isRoot: false, acIdx: 2 }
        }
      ]
    },
    { // 号码分布情况
      path: 'number',
      component: () => import('@/views/business/index'), // Parent router-view
      name: 'Number',
      meta: { title: '号码', isRoot: false, acIdx: 2 },
      redirect: '/business/limit',
      children: [
        {
          path: 'distribute',
          component: () => import('@/views/business/number/distribute'),
          name: 'Distribute',
          meta: { title: '号码分布情况', isRoot: false, acIdx: 2 }
        }
      ]
    },
    { // 5、号码限额
      path: 'limit',
      component: () => import('@/views/business/index'), // Parent router-view
      name: 'Limit',
      meta: { title: '限制', isRoot: false, acIdx: 2 },
      redirect: '/business/limit',
      children: [
        {
          path: 'quota',
          component: () => import('@/views/business/limit/quota'),
          name: 'Quota',
          meta: { title: '号码限额', isRoot: false, acIdx: 2 }
        }
      ]
    },
    { // 6、地区限时
      path: 'limit',
      component: () => import('@/views/business/index'), // Parent router-view
      name: 'Limit',
      meta: { title: '限制', isRoot: false, acIdx: 2 },
      redirect: '/business/limit',
      children: [
        {
          path: 'area',
          component: () => import('@/views/business/limit/area'),
          name: 'Area',
          meta: { title: '地区限时', isRoot: false, acIdx: 2 }
        }
      ]
    },
    { // 设置帐号密码&POS机在线情况
      path: 'account',
      component: () => import('@/views/business/index'), // Parent router-view
      name: 'Account',
      meta: { title: '帐号', isRoot: false, acIdx: 2 },
      redirect: '/business/account',
      children: [
        {
          path: 'manager',
          component: () => import('@/views/business/account/manager'),
          name: 'Manager',
          meta: { title: '设置帐号密码', isRoot: false, acIdx: 2 }
        }
      ]
    },
    { // 平台设置
      path: 'account',
      component: () => import('@/views/business/index'), // Parent router-view
      name: 'Account',
      meta: { title: '帐号', isRoot: false, acIdx: 2 },
      redirect: '/business/account',
      children: [
        {
          path: 'platform',
          component: () => import('@/views/business/account/platform'),
          name: 'Platform',
          meta: { title: '平台设置', isRoot: false, acIdx: 2 }
        }
      ]
    }
  ]
}

export default businessRouter
